package com.aun.hassels.beans;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.PostConstruct;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;
import org.apache.log4j.Logger;
import com.aun.hassels.entity.BusinessSegment;

/**
 * Bean for search table/search wizard in main.xhtml
 * 
 * @see main.xhtml
 * @author sebastian
 */
@RequestScoped
@ManagedBean(name = "wizard")
public class WizardBean implements Serializable {

	private static final long serialVersionUID = 42L;

	private static Logger log = Logger.getLogger(WizardBean.class);

	private List<BusinessSegment> segments;
	private List<BusinessSegment> segmentsFiltered;

	public WizardBean() {
		// nothing
	}

	@PostConstruct
	private void initialize() {
		segments = new ArrayList<BusinessSegment>();
		segments.add(new BusinessSegment("Apotheken", 7));
		segments.add(new BusinessSegment("Autohändler", 13));
		segments.add(new BusinessSegment("Bars und Kneipen", 15));
		segments.add(new BusinessSegment("Bäcker", 12));
		segments.add(new BusinessSegment("Eis Café", 12));
		segments.add(new BusinessSegment("Fahrschulen", 11));
		segments.add(new BusinessSegment("Friseur", 10));
		segments.add(new BusinessSegment("Kiosk", 15));
		segments.add(new BusinessSegment("Metztger", 6));
		segments.add(new BusinessSegment("Restaurants", 13));
		segments.add(new BusinessSegment("Schnell-Imbiss", 14));
		segments.add(new BusinessSegment("Supermärkte", 9));
	}

	/* ********** Actions ************************************ */

	// /**
	// * Send email with form information.
	// *
	// * @return
	// */
	// public String actionSubmit() {
	// return "main";
	// }

	/* ********** Getter/Setter ****************************** */

	public List<BusinessSegment> getSegments() {
		return segments;
	}

	public void setSegments(List<BusinessSegment> segments) {
		this.segments = segments;
	}

	public List<BusinessSegment> getFilteredSegments() {
		return segmentsFiltered;
	}

	public void setFilteredSegments(List<BusinessSegment> filteredSegments) {
		this.segmentsFiltered = filteredSegments;
	}

}
